/*
Martin Gilens	
Proposal title: The Salience of National Identity and Americans' Orientations Toward Subgroups


HYPOTHESES

Stated-Hyp1: The flag manipulation will reduce support for welfare and increase "cynical attitudes towards welfare recipients". (p. 3)

	Test-Hyp1: Support for economic help will be lower among those who saw flag manipulation vs. not. 

	Test-Hyp2: Perception that people really need help will be lower among those who saw flag manipulation vs. not. 

	Test-Hyp3: Favorability of people on welfare will be lower among those who saw flag manipulation vs. not. 
	
	Test-Hyp4: Favorability of poor people will be lower among those who saw flag manipulation vs. not. 	

	Test-Hyp5: Support for welfare programs will be lower among those who saw flag manipulation vs. not. 
	
	Test-Hyp6: Support for programs to help poor people will be lower among those who saw flag manipulation vs. not. 
	
	
Stated-Hyp2: The flag manipulation will affect liberals and conservatives differently. It will make conservatives reduce support for welfare and have "cynical attitudes towards welfare recipients" but it will not affect liberals. (p. 3)

	
	Test-Hyp7: Among conservatives, support for economic help will be lower among those who saw flag manipulation vs. not. 

	Test-Hyp8: Among conservatives, perception that people really need help will be lower among those who saw flag manipulation vs. not. 	

	Test-Hyp9: Among conservatives, favorability of people on welfare will be lower among those who saw flag manipulation vs. not. 
	
	Test-Hyp10: Among conservatives, favorability of poor people will be lower among those who saw flag manipulation vs. not. 	
		

	Test-Hyp11: Among conservatives, support for welfare programs will be lower among those who saw flag manipulation vs. not. 
	
	Test-Hyp12: Among conservatives, support for programs to help poor people will be lower among those who saw flag manipulation vs. not. 
			
		
	Test-Hyp13: Among liberals, support for economic help will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp14: Among liberals, perception that people really need help will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp15: Among liberals, favorability of people on welfare will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp16: Among liberals, favorability of poor people will not vary among those who saw flag manipulation vs. not. 	
	
	Test-Hyp17: Among liberals, support for welfare programs will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp18: Among liberals, support for programs to help poor people will not vary among those who saw flag manipulation vs. not. 
			
		
	
Stated-Hyp3: The flag manipulation will not affect attitudes towards other subgroups (i.e. other than welfare recipients/poor). (p. 3)
	
	Test-Hyp19: Favorability of immigrants will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp20: Favorability of african americans will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp21: Favorability of gays/lesbians will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp22: Favorability of rich people will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp23: Favorability of Christian fundamentalists will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp24: Favorability of Tea Party will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp25: Favorability of business owners will not vary among those who saw flag manipulation vs. not. 
	
	Test-Hyp26: Favorability of farmers will not vary among those who saw flag manipulation vs. not. 	

	Test-Hyp27: Support for government programs to help blacks will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp28: Support for government programs to help business owners will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp29: Support for government programs to help farmers will not vary among those who saw flag manipulation vs. not. 

	Test-Hyp30: Support for government programs to help small towns will not vary among those who saw flag manipulation vs. not. 
	

********************************************************************************
NOTES:
- Hypotheses are not clearly specified. The proposal explains the findings of 
their pilot study that they want to replicate. We have fashioned the stated 
hypotheses after the three main findings of their pilot study. 
	
- Outcomes are on proposal page 7.
*/

clear all
use "Gilens419.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* Treatment group: flag or no flag
	recode xTess151 (1/2=1) (3/4=0), gen(flag)
	tab flag
	
	
	
* OUTCOME MEASURES

* economic help (combining govt and charitable org question wording- see p. 7)
	/*
	Do you agree or disagree that government should provide help with food, rent, and other basic needs to people who have lost their jobs during the economic downturn even if they have family members that could help them make ends meet? 
	*/

 	tab Q1a, mis
	tab Q1b, mis
	
	clonevar economichelp=Q1a
	replace economichelp=Q1b if Q1a==.
	tab economichelp, mis
	

* perception that welfare recipients need help
	/*
	Do you think that most people who receive money from welfare today could get along without it if they tried, or do you think that most of them really need this help? 
	*/	

	tab Q2, mis
	clonevar needhelp=Q2
	

* perceptions about groups	
	/*
	Q3-Q12. Please indicate how favorable or unfavorable you feel toward each of the following groups

	Q3. Immigrants
	Q4. African Americans 
	Q5. Gays and lesbians
	Q6. People on welfare 
	Q7. Poor people 
	Q8. Rich people 
	Q9. Christian fundamentalists
	Q10. The Tea Party
	Q11. Business owners
	Q12. Farmers

	*/

	forval i=3/12 {
		tab Q`i', mis
	}

	clonevar immigrant= Q3
	clonevar black = Q4
	clonevar lgbt=Q5
	clonevar welfarerecep=Q6
	clonevar poor = Q7
	clonevar rich = Q8
	clonevar christianfundam = Q9
	clonevar teaparty=Q10
	clonevar businessowner=Q11
	clonevar farmer=Q12

	
* support for govt programs	
	/*
	Q13-Q18. The United States' government has many programs that are designed to help different groups with problems they may be facing. Please tell us if you think the government should be doing more or less to help each of the following groups:
	Q13. Poor people
	Q14. African Americans 
	Q15. Business owners
	Q16. Welfare recipients
	Q17. Farmers
	Q18. Small towns with high levels of unemployment
	*/
	
	forval i=13/18 {
		tab Q`i', mis
	}
	
	clonevar helpmore_poor = Q13
	clonevar helpmore_black = Q14
	clonevar helpmore_businessowners = Q15
	clonevar helpmore_welfarerecep = Q16
	clonevar helpmore_farmer = Q17
	clonevar helpmore_smalltown = Q18
					
	
	
* MODERATORS

* political ideology
	tab xIdeo
	clonevar ideology = xIdeo
	recode ideology (1/3=1 "liberal") (5/7=0 "conservative") (*=.), gen(liberal)
	tab liberal, mis
	
********************************************************************************

* ANALYSIS
	

*	Test-Hyp1: Support for economic help will be lower among those who saw flag manipulation vs. not. 
	reg economichelp i.flag
	// reject. .478
	tess 1.flag -, init(Gilens419) bonf(18)
	
*	Test-Hyp2: Perception that people really need help will be lower among those who saw flag manipulation vs. not. 
	reg needhelp i.flag
	// reject. .017
	tess 1.flag -, bonf(18)
	
*	Test-Hyp3: Favorability of people on welfare will be lower among those who saw flag manipulation vs. not. 
	reg welfarerecep i.flag
	// reject. .004
	tess 1.flag -, bonf(18)
	
*	Test-Hyp4: Favorability of poor people will be lower among those who saw flag manipulation vs. not. 	
	reg poor i.flag
	// reject. .004
	tess 1.flag -, bonf(18)
	
*	Test-Hyp5: Support for welfare programs will be lower among those who saw flag manipulation vs. not. 
	reg helpmore_welfarerecep i.flag
	// reject. .008
	tess 1.flag -, bonf(18)
	
*	Test-Hyp6: Support for programs to help poor people will be lower among those who saw flag manipulation vs. not. 
	reg helpmore_poor i.flag
	// reject. .062
	tess 1.flag -, bonf(18)			
	
	// for hypotheses 1-6 + 19-30, bonferonni correction needed: 
	di 0.05/18 // 0.002 is the test threshold.

	
*	Test-Hyp7: Among conservatives, support for economic help will be lower among those who saw flag manipulation vs. not. 
	reg economichelp i.flag if liberal==0
	// reject. .845
	tess 1.flag -, bonf(6)	
	
*	Test-Hyp8: Among conservatives, perception that people really need help will be lower among those who saw flag manipulation vs. not. 	
	reg needhelp i.flag if liberal==0
	// reject. .558
	tess 1.flag -, bonf(6)	
	
*	Test-Hyp9: Among conservatives, favorability of people on welfare will be lower among those who saw flag manipulation vs. not. 
	reg welfarerecep i.flag if liberal==0
	// reject. .201
	tess 1.flag -, bonf(6)
	
*	Test-Hyp10: Among conservatives, favorability of poor people will be lower among those who saw flag manipulation vs. not. 	
	reg poor i.flag if liberal==0
	// reject. .079
	tess 1.flag -, bonf(6)			

*	Test-Hyp11: Among conservatives, support for welfare programs will be lower among those who saw flag manipulation vs. not. 
	reg helpmore_welfarerecep i.flag if liberal==0
	// reject. .330
	tess 1.flag -, bonf(6)
	
*	Test-Hyp12: Among conservatives, support for programs to help poor people will be lower among those who saw flag manipulation vs. not. 
	reg helpmore_poor i.flag if liberal==0
	// reject. .767		
	tess 1.flag -, bonf(6)	
	
	// for hypotheses 7-12, bonferonni correction needed: 
	di 0.05/6 // 0.008 is the test threshold.
	
	
*	Test-Hyp13: Among liberals, support for economic help will not vary among those who saw flag manipulation vs. not. 
	reg economichelp i.flag if liberal==1
	// do not reject. .694
	tess 1.flag, bonf(6)		
	
	
*	Test-Hyp14: Among liberals, perception that people really need help will not vary among those who saw flag manipulation vs. not. 
	reg needhelp i.flag if liberal==1
	// do not reject. .032
	tess 1.flag, bonf(6)		
		
*	Test-Hyp15: Among liberals, favorability of people on welfare will not vary among those who saw flag manipulation vs. not. 
	reg welfarerecep i.flag if liberal==1
	// do not reject. .132
	tess 1.flag, bonf(6)		
			
*	Test-Hyp16: Among liberals, favorability of poor people will not vary among those who saw flag manipulation vs. not. 	
	reg poor i.flag if liberal==1
	// do not reject. .144
	tess 1.flag, bonf(6)		
		
	
*	Test-Hyp17: Among liberals, support for welfare programs will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_welfarerecep i.flag if liberal==1
	// reject. .002
	tess 1.flag, bonf(6)		
	
	
*	Test-Hyp18: Among liberals, support for programs to help poor people will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_poor i.flag if liberal==1
	// do not reject. .095			
	tess 1.flag, bonf(6)
	
	// for hypotheses 13-18, bonferonni correction needed: 
	di 0.05/6 // 0.008 is the test threshold.
		
	
	

*	Test-Hyp19: Favorability of immigrants will not vary among those who saw flag manipulation vs. not. 
	reg immigrant i.flag
	// do not reject. 0.282
	tess 1.flag, bonf(18)	
	
*	Test-Hyp20: Favorability of african americans will not vary among those who saw flag manipulation vs. not. 
	reg black i.flag
	// do not reject. 0.098
	tess 1.flag, bonf(18)	
	
*	Test-Hyp21: Favorability of gays/lesbians will not vary among those who saw flag manipulation vs. not. 
	reg lgbt i.flag
	// do not reject. 0.107
	tess 1.flag, bonf(18)	
	
*	Test-Hyp22: Favorability of rich people will not vary among those who saw flag manipulation vs. not. 
	reg rich i.flag
	// do not reject. 0.220
	tess 1.flag, bonf(18)		
	
*	Test-Hyp23: Favorability of Christian fundamentalists will not vary among those who saw flag manipulation vs. not. 
	reg christianfundam i.flag
	// do not reject. 0.890
	tess 1.flag, bonf(18)		
	
*	Test-Hyp24: Favorability of Tea Party will not vary among those who saw flag manipulation vs. not. 
	reg teaparty i.flag
	// do not reject. 0.438
	tess 1.flag, bonf(18)	
	
*	Test-Hyp25: Favorability of business owners will not vary among those who saw flag manipulation vs. not. 
	reg businessowner i.flag
	// do not reject. 0.717
	tess 1.flag, bonf(18)	
	
*	Test-Hyp26: Favorability of farmers will not vary among those who saw flag manipulation vs. not. 	
	reg farmer i.flag
	// do not reject. 0.270
	tess 1.flag, bonf(18)		


*	Test-Hyp27: Support for government programs to help blacks will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_black i.flag
	// do not reject. 0.218
	tess 1.flag, bonf(18)	
	
*	Test-Hyp28: Support for government programs to help business owners will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_businessowners i.flag
	// do not reject. 0.247
	tess 1.flag, bonf(18)	
	
*	Test-Hyp29: Support for government programs to help farmers will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_farmer i.flag
	// do not reject. 0.425
	tess 1.flag, bonf(18)	
	
*	Test-Hyp30: Support for government programs to help small towns will not vary among those who saw flag manipulation vs. not. 
	reg helpmore_smalltown i.flag
	// do not reject. 0.625
	tess 1.flag, bonf(18)		
